package miniBanco.Gui;


import java.util.ArrayList;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JSeparator;

import miniBanco.Dto.ClienteDTO;
import MySwing.JMyGridABM;

public class ClientesGridAbm extends JPanel
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JMyGridABM grid;
	private ClientesTableModel model;
	private JButton BtnVerCuentas;
	private ArrayList<ClienteDTO> data;
	public ClientesGridAbm()
	{
		grid = new JMyGridABM();
		add(grid);
		JSeparator separador = new JSeparator();
		BtnVerCuentas = new JButton();
		BtnVerCuentas.setText("Ver Cuentas");
		add(separador);
		add(BtnVerCuentas);	
	}
	public void Refresh(ArrayList<ClienteDTO> data)
	{
		this.data = data;
		model = new ClientesTableModel(data);
		this.grid.Refresh(model);
	}
	public JMyGridABM getGrid()
	{
		return grid;
	}
	public JButton getBtnVerCuentas()
	{
		return BtnVerCuentas;
	}	
	public ArrayList<ClienteDTO> getData()
	{
		return data;
	}
}


